#ifndef __WORLD_H
#define __WORLD_H

/*
	WORLD.H

	The CWorld class

	Description: The CWorld class represents the game world
				 of the engine. All objects, the terrain,
				 audio system, ambient world music and sound,
				 and the camera are held here.


*/

class CCamera;
class CObject;
class CPlayer;
class CGUI;
class CSnowman;
class CDirectXAudio;
class CTerrain;
class CRadar;
class Hat;
class Helicopter;

#define MAX_ENEMIES 10

class CWorld
{
private:
	int numSnowmen;
	int screenWidth, screenHeight;
	bool gameDone;

protected:
	void OnAnimate(float deltaTime);
	void OnPrepare();

public:
	CTerrain* terrain;
	CCamera* camera;
	CPlayer* player;
	Helicopter* heli;
	CDirectXAudio* audioSystem;
	CGUI* gui;
	CRadar* radar;
	CSnowman* snowmenEnemy;
	Hat* hat;

	float timeStart;
	float timeElapsed;
	int hatsCollected;

	CWorld();
	CWorld(CCamera *c);
	~CWorld();

	// initialize terrain, load objects and put in container
	void LoadWorld();
	void UnloadWorld();

	int CountObjectTypes(const type_info &classID);

	// do physics calculations for all objects in the world
	// including collisions
	void Animate(float deltaTime);

	// render all objects in the world
	void Draw(CCamera *camera);
	void Draw2D(int windowWidth, int windowHeight);
	void Prepare() { OnPrepare(); }

	void FadeScreen();
	void SetScreen(int width, int height);

	bool IsGameDone() { return gameDone; }
	void SetGameDone(bool gameDone) { this->gameDone = gameDone; }
	void QuitGame() { gameDone = true; }
	int GetSnowmen() { return numSnowmen; }
};


#endif